package com.example.no2_activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Log.d("lwq","my 调试消息 : onCreate");
    }

    public void jump1(View v){
        Intent intent = new Intent();
        intent.setClass(this,MainActivity2.class);
        startActivity(intent);
    }

    public void jump2(View v){
        Intent intent = new Intent();
        intent.setClass(this,MainActivity2.class);
        intent.putExtra("msg","你好!");
        startActivity(intent);
    }
    @Override
    protected void onStart() {
        super.onStart();
        Log.d("lwq","my 调试消息 : onStart");
    }

    @Override
    protected void onStop() {
        super.onStop();
        Log.d("lwq","my 调试消息 : onStop");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.d("lwq","my 调试消息 : onDestroy");
    }
}